<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
%>

<form id="pagerForm" method="post" action="<%=path %>/user/listUser.action">
	<input type="hidden" name="pageRequest" value="1" />
	<input type="hidden" name="pageNum" value="${paginator.pageIndex}" />
	<input type="hidden" name="numPerPage" value="${paginator.pageSize}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" rel="pagerForm" action="<%=path %>/user/listUser.action" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>账号：</label>
				<input type="text" name="userVO.account" value='<s:property value="userVO.account" />' />
			</li>
			<li>
				<label>名称：</label>
				<input type="text" name="userVO.name" value='<s:property value="userVO.name" />' />
			</li>
			<li>
				<label>时间：</label>
				<input type="text" name="date1" class="date" readonly="true"/>
			</li>
		</ul>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<%=path %>/user/addUser.action" target="navTab"><span>添加</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="key" postType="string" href="<%=path %>/user/deleteUser.action" class="delete"><span>删除</span></a></li>
			<li><a class="edit" href="<%=path %>/user/editUser.action?userVO.id={sid_user}" target="navTab" warn="请选择一个用户"><span>修改</span></a></li>
		</ul>
	</div>
	<table class="table" width="1150" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="100">账号</th>
				<th >名称</th>
				<th width="80">密码</th>
				<th width="70">操作</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="userList" id="user" status="st">
				<tr target="sid_user" rel="<s:property value="id" />">
					<td><input name="key" value="<s:property value="id" />" type="checkbox"></td>
					<td><s:property value="account" /></td>
					<td><s:property value="name" /></td>
					<td><s:property value="password" /></td>
					<td>
						<a title="确实要删除这条记录吗?" target="ajaxTodo" href="<%=path %>/user/deleteUser.action?key=<s:property value="id" />" class="btnDel">删除</a>
						<a title="编辑" target="navTab" href="<%=path %>/user/editUser.action?userVO.id=<s:property value="id" />" class="btnEdit">编辑</a>
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="15" <c:if test="${paginator.pageSize==15}">selected='selected'</c:if> >15</option>
				<option value="50" <c:if test="${paginator.pageSize==50}">selected='selected'</c:if> >50</option>
				<option value="100" <c:if test="${paginator.pageSize==100}">selected='selected'</c:if> >100</option>
				<option value="200" <c:if test="${paginator.pageSize==200}">selected='selected'</c:if> >200</option>
			</select>
			<span>条，共${paginator.totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${paginator.totalCount}" 
			numPerPage="${paginator.pageSize}" pageNumShown="10" currentPage="${paginator.pageIndex}"></div>

	</div>
</div>
